import time
while True:
    message = 'how old are you ?\n'
    age = input(message)
    try :
        age = int(age)
        if age <= 18 :
           print ('sorry, you can\'t vote')
           time.sleep(1)
        elif age > 18 :
           print ('welcome')
           time.sleep(1)
    except ValueError:
        if age == 'q' or age == 'exit' :
            break
        print ('please enter a number')
        time.sleep(1)
    continue
